package com.example.commons.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * @program: authority-v3.0.7
 * @ClassName:Teach
 * @description: 回目攻略 实体类
 * @author:dyy
 * @Version 3.0
 **/

@Data
@Builder(toBuilder = true)
@AllArgsConstructor
@NoArgsConstructor
@TableName("sys_teach")
@Schema(title = "Teach对象", description = "回目攻略")
public class Teach implements Serializable {
    private static final long serialVersionUID = 1L;

    @Schema(title = "序列号")
    @TableId(value = "id", type = IdType.AUTO)
    @ExcelProperty("序列号")
    private Long id;

    @Schema(title = "攻略名称")
    @TableField("name")
    @ExcelProperty("攻略名称")
    private String name;

    @Schema(title = "攻略封面")
    @TableField("img")
    @ExcelProperty("攻略封面")
    private String img;

    @Schema(title = "所属回目")
    @TableField("cid")
    @ExcelProperty("所属回目")
    private Long cid;

    @Schema(title = "攻略简介")
    @TableField("des")
    @ExcelProperty("攻略简介")
    private String des;

    @Schema(title = "攻略详情")
    @TableField("content")
    @ExcelProperty("攻略详情")
    private String content;

    @TableField(exist = false)
    @ExcelIgnore
    private Category category = new Category();

    @TableField(exist = false)
    @ExcelIgnore
    private Boolean isCollect = false;
}
